{extends file='layout/default.tpl'}
{block name=title}易控-文件轨迹{/block}
{block name=head}
<link rel="stylesheet" type="text/css" href="/static/css/trace.css?v={$smarty.const.UNCLONE_VERSION}">
{/block} {block name=body}
<div id="traceList" class="traceList">
	<div id="trace-wrap" class="trace-wrap clearfix" {if $file_empty==1}style="display: none;" {/if}>
		<div class="list-title clearfix" id="list-title">
			<ul class="left">
				<li class="file">文件</li>
				<li class="date">日期</li>
				<li class="trace">轨迹</li>
			</ul>
			<ul class="right">
				<li class="actor-filter my"><a href="javascript:void(0);"><span class="filter-icon"></span>我的操作</a></li>
				<li class="actor-filter all active"><a href="javascript:void(0);"><span class="filter-icon"></span>文件轨迹</a></li>
			</ul>
		</div>
		<div class="content clearfix">
			<div class="file-box" id="fileBox" data-rows="{$rows}">
				<div class="data-list">
					<div class="panel">
						<div style="position: relative;" class="mCSB">
							<ul>
								{foreach $files as $key => $file}
	<li class="{if {$file.uuid}=={$uuid}}active {/if}" data-uuid="{$file.uuid}" title="{$file.name}.{$file.ext_name}">
		<span class="icon-ftype icon-ftype-{$file.ext_name}"></span>{$file.name}.{$file.ext_name}
	</li>
{/foreach}
							</ul>
						</div>
					</div>
				</div>
				<div class="page-wrap">
					<span class="trace_icons icon-up"></span>
					<span class="trace_icons icon-down"></span>
				</div>
			</div>
			<div class="date-box" id="dateBox">
				<div class="data-list">
					<div class="panel">
						<div style="position: relative;" class="mCSB">
							<ul>
								{foreach $dates as $key => $date}
	<li class="{if ($key+1)%2 == 0 }col2{/if}
										   {if $key == 0}active{/if} "
		data-index="{$key}" data-uuid="{$date.ts}">
		<a href="javascript:void(0)" for="{$date.ts}" >{$date.ts}</a>
	</li>
{/foreach}
	{if 5-$dateTotal>0}
		{for $a=0;$a<(5-$dateTotal);$a++}
			<li  class='not-data'></li>
		{/for}
	{/if}
							</ul>
						</div>
					</div>
				</div>
				<div class="page-wrap">
					<span class="trace_icons icon-up"></span>
					<span class="trace_icons icon-down"></span>
				</div>
			</div>
			<div class="trace-box" id="traceBox">
				<div class="trace-list">
					<div class="mypage" id="mypage">
						<div id="waterfall">
							{if $traces != null }
							{foreach $traces as $key => $trace}
								<div class="date-trace" id="{$trace.ts}">
									{*<div class="title">
										{$trace.ts}
									</div>*}
									<div class="ct">
										{if $trace.list!=null}
										{foreach $trace.list as $index=> $item}
										<div class="trace" data-index="{$item.index}">
											<div class="msdate">{$item.tsHi}</div>
											{if !isset($item.options)}
											<div class="ope"><span class="no-options">{$item.name}</span>{if $item.unsafe}<i class="trace_icons sprite-warn"></i>{/if}</div>
											{else}
											<div class="ope">
												<span class="dec">{$item.name}</span>
												<div class="options ">
													{foreach $item.options as $j => $option}
													{if ($j+1) % 2 == 0 && $j != 0}
													<div style="width:49%{*{if $j % 2 == 0}63%{else}37%{/if}*};float:left;">
														<span class="trace_icons {$option.icon}"></span>
														{$option.info} {if isset($option.copytext)}<a href="javascript:void(0);" class="copy-readpwd" data-clipboard-text="{$option.copytext}">复制</a>{/if}
													</div>
												</div>
												{else}
												<div class="row1 clearfix">
													<div style="width:49%{*{if $j % 2 == 0}63%{else}37%{/if}*};float:left;">
														<span class="trace_icons {$option.icon}"></span>
														{$option.info} {if isset($option.copytext)}<a href="javascript:void(0);" class="copy-readpwd" data-clipboard-text="{$option.copytext}">复制</a>{/if}
													</div>
													{if count($item.options) == $j+1}
												</div>
												{/if}
												{/if}
												{/foreach}
											</div>
										</div>
										{/if}
									</div>

									{/foreach}
									{/if}
								</div>
								</div>
							{/foreach}
							{else}
							<div class="date-trace">
								<div class="title">
								</div>
								<div class="ct">
								</div>
							</div>
							{/if}
					 	</div>
				 	</div>
				</div>
			</div>
		</div>
	</div>
	{if $file_empty==1}
		<div class="emptybox" id="empty-box">
			{$error_info}
		</div>
	{/if}
</div>
{/block} 

{block name=foot} 

<script id="fileTpl" type="text/html">
{literal}
{{#files}}
<li class="{{#active}}active{{/active}}" data-uuid="{{uuid}}" title="{{name}}.{{ext_name}}">
	<span class="icon-ftype icon-ftype-{{ext_name}}"></span>{{name}}.{{ext_name}}
</li>
{{/files}}
{/literal}
</script>


<script id="dateTpl" type="text/html">
{literal}
{{#dates}}
<li class="{{#col2}}col2{{/col2}} {{#active}}active{{/active}}" data-index="{{index}}" data-uuid="{{ts}}">
	<a href="javascript:void(0)" for="{{ts}}" >{{ts}}</a>
</li> 
{{/dates}}
{/literal}
</script>

<script id="traceTpl" type="text/html">
{literal}
{{#traces}}
		<div class="trace" data-index="{{index}}">
			<div class="msdate">{{tsHi}}</div>
			{{^hasOptions}}
			<div class="ope">
				<span class="no-options">{{name}}</span>
			</div>
			{{/hasOptions}}
			{{#hasOptions}}
			<div class="ope">
				<span class="dec">{{name}}</span>
				<div class="options">
					{{#options}}
						{{#uneven}}
								<div style="width: 49%; float: left;">
									<span class="trace_icons {{icon}}"></span>
							 		{{info}}
								</div>
							</div>
						{{/uneven}}
						{{#even}}
							<div class="row1 clearfix">
								<div style="width: 49%; float: left;">
									<span class="trace_icons {{icon}}"></span>
							 		{{info}}
							 		{{#copytext}}
							 		<a href="javascript:void(0);" class="copy-readpwd" data-clipboard-text="{{copytext}}">复制</a>
							 		{{/copytext}}
								</div>
							{{#isLast}}
								</div>
							{{/isLast}}
						{{/even}}
					{{/options}}	
				</div>
			</div>
			{{/hasOptions}}
		</div>
{{/traces}}
{/literal}
</script>
{/block}
